﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Public;
using DAL;

namespace BLL
{
    public class ChuyenKhauBLL
    {
        public static List<ChuyenKhauPublic> LoadChuyenKhauBySoCK(int SoChuyenKhau)
        {
            return ChuyenKhauDAL.LoadChuyenKhauBySoCK(SoChuyenKhau);
        }
        public static List<ChuyenKhauPublic> LoadChuyenDenBySoCK(int SoChuyenKhau)
        {
            return ChuyenKhauDAL.LoadChuyenDenBySoCK(SoChuyenKhau);
        }
        public static List<ChuyenKhauPublic> LoadChuyenKhauByMaNK(int MaNK, string TenServer, string TenDaTa)
        {
            return ChuyenKhauDAL.LoadChuyenKhauByMaNK(MaNK,TenServer,TenDaTa);
        }
        public static int LoadMaCK()
        {
            return ChuyenKhauDAL.LoadMaCK();
        }
        //public static int LoadMaCDen(int MaPX)
        //{
        //    return ChuyenKhauDAL.LoadMaCDen(MaPX);
        //}
        
        public static int LoadSoChuyenKhau()
        {
            return ChuyenKhauDAL.LoadSoChuyenKhau();
        }
        public static int CountChuyenDenByYear(int firstyear, int lastyear)
        {
            return ChuyenKhauDAL.CountChuyenDenByYear(firstyear, lastyear);
        }
        public static int CountChuyenDiByYear(int firstyear, int lastyear)
        {
            return ChuyenKhauDAL.CountChuyenDiByYear(firstyear, lastyear);
        }
        public static int CountChuyenDinByYear(int firstyear, int lastyear)
        {
            return ChuyenKhauDAL.CountChuyenDinByYear(firstyear, lastyear);
        }
        public static void UpdateChuyenDen(int SoChuyenKhau, byte MaQH, string ThuongTru, string LyDoChuyen, DateTime NgayCap, string NguoiCap, byte ChucVu, int NoiCap, string NguoiNhan, byte ChucVuNguoiNhan, int MaCK)
        {
            ChuyenKhauDAL.UpdateChuyenDen(SoChuyenKhau, MaQH, ThuongTru, LyDoChuyen, NgayCap, NguoiCap, ChucVu, NoiCap, NguoiNhan, ChucVuNguoiNhan, MaCK);
        }
        public static void UpdateChuyenDi(byte MaQH, string ChuHo, int NoiChuyen, string LyDoChuyen, string NguoiCap, int ChucVu, int MaCK)
        {
            ChuyenKhauDAL.UpdateChuyenDi(MaQH, ChuHo, NoiChuyen, LyDoChuyen, NguoiCap, ChucVu, MaCK);
        }
        public static void DeleteChuyenKhau(int MaCK)
        {
            ChuyenKhauDAL.DeleteChuyenKhau(MaCK);
        }
    }
}
